//*****************************************************************************
//
// ABEC3 Solving File
// Project: SP38-2
//
//*****************************************************************************

// Script with vertex coordinates

File="Formula.txt"
File="Nodes.txt"

// Controlling parameters of the solver
 
Control_Solver
  f1=20;  f2=500;  NumFrequencies=48;  Abscissa=log;
  MeshFrequency=1000Hz
  Meshing=Bifu 
  Sym=y; 
  Dim=3D
  NUC=false


SubDomain_Properties 'Enclosure'
  SubDomain=1
  ElType=Interior
  Color=0.3,0.3,0.3

SubDomain_Properties 'Vent Bottom'
  SubDomain=2
  ElType=Interior

SubDomain_Properties 'Vent Top'
  SubDomain=3
  ElType=Interior

SubDomain_Properties 'Exterior'
  SubDomain=4
  ElType=Exterior            // Radiation to infinity
  
Infinite_Baffle  
  SubDomain=4
  IBPlane=z                  // Floor reflection


Elements "Enclosure-Interior"
  RefNodes="NF"
  SubDomain=1
  101   12201  12204  12203  12202  // rear wall
  102   12001  12201  12202  12002  // top wall
  103   12004  12003  12203  12204  // bottom wall
  104   12002  12202  12203  12003  // side wall
  201   13003  13008  13007  13002  // Baffle1 center
  202   13001  13007  13006  12012  // Baffle1 diaph-vent
  203   12013  13006  13005  12014  // Baffle1 vent
  204   12011  13005  12003  12004  // Baffle1 bottom
  211   13012  13017  13018  13013  // Baffle1 center
  212   13011  12022  13016  13017  // Baffle2 diaph-vent
  213   13015  13016  12023  12024  // Baffle2 vent
  214   12002  13015  12021  12001  // Baffle2 bottom
  301   13014  13018  13008  13004  // Inbetween Baffle1 and Baffle2

WallImpedance 
  RefElements="Enclosure-Interior"
  ImpType=Damping
  Value=0.01


Elements "Enclosure-Vent Bottom"
  RefNodes="NF"
  SubDomain=1
  SwapNormals=true
  EdgeLength=70mm
  201   12012  12016  12017  12013  // vent top
  202   12013  12017  12018  12014  // vent side
  203   12011  12014  12018  12015  // vent bottom


Elements "I-Enclosure-Vent Bottom"
  RefNodes="NF"
  SubDomain=1,2                    // Connecting sub-domain 1 and 2
  EdgeLength=70mm
  101   12016  12017  12018  12015


Elements "Vent-Inner Bottom"
  RefNodes="NF"
  SubDomain=2
  EdgeLength=70mm
  201   2012  12016  12017   2013  // vent top
  202   2013  12017  12018   2014  // vent side
  203   2011   2014  12018  12015  // vent bottom

WallImpedance 
  RefElements="Vent-Inner Bottom"
  ImpType=Damping
  Value=0.1


Elements "I-Vent-Exterior Bottom"
  RefNodes="NF"
  SubDomain=2,4                    // Connecting sub-domain 2 and 4
  EdgeLength=70mm
  101   2012  2013  2014  2011


Elements "Enclosure-Vent Top"
  RefNodes="NF"
  SubDomain=1
  EdgeLength=70mm
  201   12022  12026  12027  12023  // vent top
  202   12023  12027  12028  12024  // vent side
  203   12021  12024  12028  12025  // vent bottom


Elements "I-Enclosure-Vent Top"
  RefNodes="NF"
  SubDomain=1,3                    // Connecting sub-domain 1 and 3
  EdgeLength=70mm
  SwapNormals
  101   12026  12027  12028  12025


Elements "Vent-Inner Top"
  RefNodes="NF"
  SubDomain=3
  EdgeLength=70mm
  SwapNormals
  201   2022  12026  12027   2023  // vent top
  202   2023  12027  12028   2024  // vent side
  203   2021   2024  12028  12025  // vent bottom

WallImpedance 
  RefElements="Vent-Inner Top"
  ImpType=Damping
  Value=0.1


Elements "I-Vent-Exterior Top"
  RefNodes="NF"
  SubDomain=3,4                    // Connecting sub-domain 3 and 4
  EdgeLength=70mm
  SwapNormals
  101   2022  2023  2024  2021



Elements "Enclosure-Exterior"
  RefNodes="NF"
  SubDomain=4
  SwapNormals=true
  101   2201  2204  2203  2202  // rear wall
  102   2001  2201  2202  2002  // top wall
  103   2004  2003  2203  2204  // bottom wall
  104   2002  2202  2203  2003  // side wall
  201   3003  3008  3007  3002  // Baffle1 center
  202   3001  3007  3006  2012  // Baffle1 diaph-vent
  203   2013  3006  3005  2014  // Baffle1 vent
  204   2011  3005  2003  2004  // Baffle1 bottom
  211   3017  3018  3013  3012  // Baffle2 center
  212   3017  3011  2022  3010  // Baffle2 diaph-vent
  213   3010  2023  2024  3009  // Baffle2 vent
  214   2001  2002  3009  2021  // Baffle2 bottom
  301   3014  3018  3008  3004  // Between Baffle1 and Baffle2


Diaphragm  "Diaphragm Bottom Front"
  Side=Front                   // Creates elements for the front side of the diaphragm
  DrvGroup=1001                // Driving group link to observation stage
  SubDomain=4                  // Front side belongs to sub-domain 4
  RefNodes="NF"
  EdgeLength=68mm
  Position=3000,3029,3004      // Triangle giving position
  Simple=true                  // Simple model
  dD=340mm                     // Diameter of cone
  tD1=70mm                     // Inner depth of cone to base of dust cap
  dD1=100mm                    // Diameter of dust cap
  hD1=30mm                     // Height of dust cap
  //Ws=10mm                   // Width of outer suspension
  hD2=100mm                    // Height of total cone on the outside
  dVC=50mm                     // Diameter of voice coil
  hVC=5mm                      // Height of voice coil
  dM=200mm                     // Diameter of magnet
  hM=30mm                      // Height of magnet

Diaphragm  "Diaphragm Bottom Rear"
  Side=Rear                    // This is the rear side of the diaphragm
  DrvGroup=1002                // Driving group link to observation stage
  SubDomain=1                  // This side belongs to sub-domain SubDomain=1
  RefDiaph="Diaphragm Bottom Front"   // Inherite from "Diaphragm Bottom Front"
  t1={-tc}                     // Offset to the rear

Diaphragm  "Diaphragm Top Front"
  Side=Front                   // Second diaphragm (upper)
  DrvGroup=2001
  SubDomain=4
  RefDiaph="Diaphragm Bottom Front"
  Position=3100,3039,3012      // Triangle giving position

Diaphragm  "Diaphragm Top Rear"
  Side=Rear
  DrvGroup=2002
  SubDomain=1
  RefDiaph="Diaphragm Top Front"
  t1={-tc}

